import {ADD} from './mutation-types'
const mutations = {
  [ADD](state) {
    // count加1
    state.count += 1;
  },
  min(state) {
    // count - 1
    state.count -= 1;
  },
  change(state, payload) {
    // payload是载荷，是传递的数据
    // console.log(state);
    console.log(payload);
    state.count = payload[0] * 7;
  },
  changeObj(state, payload) {
    // payload是载荷，是传递的数据
    // console.log(state);
    // console.log(payload.payload[0]);
    state.count = payload.payload[0] * 7;
  }
}
export default mutations